package com.dtk.api.request.tiktok;

import com.dtk.api.client.DtkApiRequest;
import com.dtk.api.request.base.DtkTiktokPageParamRequest;
import com.dtk.api.response.base.DtkApiResponse;
import com.dtk.api.response.tiktok.DtkTiktokSxGoodsListResponse;
import com.dtk.api.response.tiktok.DtkTiktokSxGoodsRankResponse;
import com.dtk.api.utils.ObjectUtil;
import com.fasterxml.jackson.core.type.TypeReference;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import java.util.Map;

/**
 * 热门活动请求参数实体
 *
 * @author 1
 * @date 2020/11/10 18:22
 */
@Getter
@Setter
public class DtkTiktokSxGoodsListRequest extends DtkTiktokPageParamRequest implements DtkApiRequest<DtkApiResponse<DtkTiktokSxGoodsListResponse>> {
    @ApiModelProperty(value = "版本号", example = "1.0.0")
    private String version = "1.0.0";
    @ApiModelProperty("抖音高佣精选商品请求path")
    private final String requestPath = "/tiktok/tiktok-sx-goods-list";

    private String kw;

    private String sort;

    private String page;

    private String size;

    private String first_cate_ids;

    private String price_start;

    private String price_end;

    private String commission_rate_start;

    private String commission_rate_end;

    private String commission_amount_start;

    private String commission_amount_end;

    private String sales_30day_start;

    private String sales_30day_end;

    private String sales_start;

    private String sales_end;

    @Override
    public Map<String, String> getTextParams() throws IllegalAccessException {
        return ObjectUtil.objToMap(this);
    }

    @Override
    public String apiVersion() {
        return this.version;
    }

    @Override
    public TypeReference<DtkApiResponse<DtkTiktokSxGoodsListResponse>> responseType() {
        return new TypeReference<DtkApiResponse<DtkTiktokSxGoodsListResponse>>() {
        };
    }

    @Override
    public String requestUrl() {
        return this.requestPath;
    }
}
